<?php
/**
 *
 * @author Administrator lizhi
 * @version 1.00
 * Email lizhi.liu@ymail.com
 */
class app {
	
	static $config = '';
	static $view = '';
	
	public function __construct() {
		
		
	}
	
	public static function run() {
		self::$config = Zend_Registry::get('config');
		$isinstall = self::_checkSysInstall();
		if($isinstall==false) {
			die('The System is not install');
		}
		self::display();
	}
	
	/*check system install?*/
	public static function _checkSysInstall() {
		if(!file_exists(self::$config->install->lock)) {
			return false;
		}
		return true;
	}
	
	
	
	public static function  display() {
		self::$view = Zend_Registry::get('view');
		if(self::$view->is_cached('index.html')) {
			self::$view->assign('name', 'Test');
		}
		self::$view->display('index.html');
	}
	
	public function __destruct() {
		
	}
}


?>